<?php
/**
 * 入参校验类
 * 如果对应的方法不存在，默认不校验
 */

namespace App\Http\Validates\Backend;

class RoleValidate
{
    static public function listRolePost()
    {
        return [
            'keyword' => 'string|between:0,30',
            'page_num' => 'required|integer|min:1',
            'page_size' => 'required|integer|min:1',
            'status' => 'integer|in:-1,1,2'
        ];
    }

    static public function addRolePost()
    {
        return [
            'role_name' => 'required|string|between:1,20',
            'note' => 'required|string|min:0,80',
            'status' => 'integer|in:1,2'
        ];
    }
}
